import Count from "../../home/index/Count";
import {connect} from "react-redux";
import {add, subtract} from "../../../redux/actions/actions";

function mapStateToProps(state){
    return {
        sum: state.sum
    }
}

function mapDispatchToProps(dispatch) {
  return {
      add: v=> dispatch(add(v)),
      subtract: v=> dispatch(subtract(v))
  }
}

export default connect(mapStateToProps, mapDispatchToProps)(Count);